<?php

use yii\db\Migration;
use yii\db\Schema;

/**
 * Class m180319_101203_ADD_FIELD
 */
class m180319_101203_ADD_FIELD extends Migration
{
    /**
     * {@inheritdoc}
     */
    public function safeUp()
    {
        $this->addColumn('{{room_code}}', 'color', Schema::TYPE_STRING. "(20) NULL COMMENT '房间颜色代码' ");
    }

    /**
     * {@inheritdoc}
     */
    public function safeDown()
    {
        echo "m180319_101203_ADD_FIELD cannot be reverted.\n";

        return false;
    }

    /*
    // Use up()/down() to run migration code without a transaction.
    public function up()
    {

    }

    public function down()
    {
        echo "m180319_101203_ADD_FIELD cannot be reverted.\n";

        return false;
    }
    */
}
